//开始页
import {Sprite} from "../base/Sprite.js";
import {DataStore} from "../base/DataStore.js";
const screenWidth    = window.innerWidth
const screenHeight   = window.innerHeight
const rpx=DataStore.getRpx()
export class BackGroundStart extends Sprite {
    constructor() {
        const image = Sprite.getImage('startbg');
        super(image,
            0, 0,
            image.width, image.height,
            0, 0,
            DataStore.getInstance().canvas.width, DataStore.getInstance().canvas.height);
    }
    drawStartTit(){
        const image = Sprite.getImage('startbgTit');
        super.draw(image,
            0, 0,
            image.width, image.height,
            (screenWidth-image.width/2*rpx)/2,50*rpx,
            image.width/2*rpx, image.height/2*rpx);
        
    }

    drawStartMan(){
        const image = Sprite.getImage('startbgMan');
        super.draw(image,
            0, 0,
            image.width, image.height,
            (screenWidth-image.width/2*rpx)/2,(screenHeight-image.height/2*rpx),
            image.width/2*rpx, image.height/2*rpx);
        
    }
}